<% String path=request.getContextPath();
   String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath %>"/>
<c:set var="demoPath" value="${pageContext.request.contextPath}/" scope="application" />